import request from '@/utils/request'

// 查询网格列表
export function listGrid(query) {
  return request({
    url: '/organization/grid/list',
    method: 'get',
    params: query
  })
}

// 查询网格详细
export function getGrid(gridId) {
  return request({
    url: '/organization/grid/' + gridId,
    method: 'get'
  })
}

// 新增网格
export function addGrid(data) {
  return request({
    url: '/organization/grid',
    method: 'post',
    data: data
  })
}

// 修改网格
export function updateGrid(data) {
  return request({
    url: '/organization/grid',
    method: 'put',
    data: data
  })
}

// 删除网格
export function delGrid(gridId) {
  return request({
    url: '/organization/grid/' + gridId,
    method: 'delete'
  })
}
export function changeGridStatus(gridId, status) {
    const data = {
        gridId,
        status
    }
    return request({
        url: '/organization/grid/changeStatus',
        method: 'put',
        data: data
    })
}
export function girdLists(communityId) {
    return request({
        url: '/organization/grid/getGridListBy/'+communityId,
        method: 'get'
    })
}


